﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 战棋模拟器
{
    class 攻城恶魔:Minion
    {
        public 攻城恶魔():base()
        {
            buff = 1;
            Star = 4;
            Attack = 5;
            Health = 8;
            Skills[2] = true;
            Race = race.devil;
        }


        public override void Initialize()
        {
            foreach (Minion m in pool.places)
            {
                if (m == null)
                    break;
                if (m != this)
                    if (m.Race == race.devil||m.Race == race.all)
                        m.Attack += buff;
            }
            base.Initialize();
        }


        public override void OnSpawn(Minion m)
        {
            if ((m.Race == race.devil||m.Race==race.all) && m != this)
                m.Attack += buff;
        }


        public override void Die()
        {
            foreach (Minion m in pool.places)
            {
                if (m == null)
                    break;
                if ((m.Race == race.devil || m.Race == race.all) && m != this)
                    m.Attack -= buff;
            }
            base.Die();
        }


        public override Minion NewOne()
        {
            return new 攻城恶魔();
        }
    }


    class 攻城恶魔_金色 : 攻城恶魔
    {
        public 攻城恶魔_金色() : base()
        {
            Attack *= 2;
            Health *= 2;
            count *= 2;
            buff *= 2;
        }

        public override Minion NewOne()
        {
            return new 攻城恶魔_金色();
        }
    }
}
